package com.rtx.edi.platform.job.express;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.rtx.api.annotation.RtxJobAnnotation;
import com.rtx.api.quartz.job.BaseJob;
import com.rtx.edi.platform.express.auth.handler.ExpressSubscriptionHandler;

@Component
@DisallowConcurrentExecution
@RtxJobAnnotation(jobName = "ExpressSubscriptionJob",description = "获取授权信息订购关系",cron = "0 0 23 * * ?")
public class ExpressSubscriptionJob implements BaseJob {
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
	private ExpressSubscriptionHandler handler;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		
		try {
			handler.handler();
		} catch (Exception e) {
			logger.error("获取授权信息订购关系异常{}",e);
		}

	}

}
